<?php
if(!isset($intAct)) {
	include_once('common/header.php');
	$objEducation			= new Education();
}
$intTab						= $objRequest->getParam('tab', 1);
$strId						= $objRequest->getParam('id', 0);
$intEducateId				= Ecore_Function::hex2Dec($strId);	
$arrResult					= $objEducation->get($intEducateId);
if(!isset($arrResult) || (isset($arrResult) && abs($arrResult['status']) > 1) ) {
	Ecore_Function::setMsg($arrError['no_perm_view']);
	$strLnk		= isset($_SESSION[SESSION_BACKURL]) ? $_SESSION[SESSION_BACKURL] : LINK_EDUCATION;
	$this->_redirect($strLnk);
}
if(isset($arrResult['features']) && $arrResult['features'] != '') {
	$strJson	= str_replace('\\','',$arrResult['features']);
	$this->view->arrFeatures = Zend_Json::decode($strJson);
}
if($intTab == 2) {
	$this->view->arrCmtSort	= $arrCmtSort[$intFrontLang];
	$intCategoryEdu			= $arrResult['category_edu'];
	include_once('education/box-cmt.php');
}elseif($intTab == 3) {
	$arrEcourse				= $objEducation->getEcourseTop($intEducateId);
	$this->view->ecourse	= $arrEcourse;
}elseif($intTab == 4) {
	$arrImage				= $objEducation->getImage($arrResult['albumid']);
	$this->view->eimage		= $arrImage;
}elseif($intTab == 5) {
}elseif($intTab == 6) {
	//facebook comment
}
$this->view->row			= $arrResult;
$this->view->strEducateId	= $strId;
$this->view->intEducateId	= $intEducateId;
$this->view->intTab			= $intTab;